﻿using Microsoft.Extensions.DependencyInjection;

namespace WebMiddleware.Extensions
{
    public static class ModuleControllerExtensions
    {
        public static IMvcBuilder AddModuleController<TModuleController>(this IMvcBuilder builder) where TModuleController : IModuleController, new()
        {
            builder.AddApplicationPart(typeof(TModuleController).Assembly);
            return builder;
        }
    }
}
